package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Region;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RegionMapper {

    int insert(Region entity);

    Region selectByPrimaryKey(Long id);
    //在SQL判断语句中由于常量没有属性,必须要贴注解,给予属性,否则SQL报错
    List<Region> selectAll(@Param("parentId") Long parentId);

    int updateByPrimaryKey(Region entity);

    void changeState(@Param("id") Long id, @Param("state") Integer state);

    List<Region> selectPlaces(@Param("state") Long state);
}